package cn.doitedu.cn.doitedu.rtdw.udfs;

import ch.hsr.geohash.GeoHash;
import org.apache.flink.table.functions.ScalarFunction;

public class ToGeoHash extends ScalarFunction {

    public String eval(Double lat,Double lng){
        String geohash = null;
        try{
            geohash = GeoHash.geoHashStringWithCharacterPrecision(lat,lng,6);
        }catch (Exception e){
            e.printStackTrace();
        }

        return geohash;
    }
}
